<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="CompagniaCreateDlg" widgetVar="CompagniaCreateDialog" modal="true" resizable="false" appendToBody="true" header="#{myBundle.CreateCompagniaTitle}" closeOnEscape="true">

            <h:form id="CompagniaCreateForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2">

                        <p:outputLabel value="#{myBundle.CreateCompagniaLabel_idCOMPAGNIA}" for="idCOMPAGNIA" />
                        <p:inputText id="idCOMPAGNIA" value="#{compagniaController.selected.idCOMPAGNIA}" title="#{myBundle.CreateCompagniaTitle_idCOMPAGNIA}" required="true" requiredMessage="#{myBundle.CreateCompagniaRequiredMessage_idCOMPAGNIA}"/>

                        <p:outputLabel value="#{myBundle.CreateCompagniaLabel_nome}" for="nome" />
                        <p:inputText id="nome" value="#{compagniaController.selected.nome}" title="#{myBundle.CreateCompagniaTitle_nome}" required="true" requiredMessage="#{myBundle.CreateCompagniaRequiredMessage_nome}" size="255" maxlength="255"/>

                        <p:outputLabel value="#{myBundle.CreateCompagniaLabel_recapito}" for="recapito" />
                        <p:inputText id="recapito" value="#{compagniaController.selected.recapito}" title="#{myBundle.CreateCompagniaTitle_recapito}" size="255" maxlength="255"/>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{compagniaController.saveNew}" value="#{myBundle.Save}" update="display,:CompagniaListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,CompagniaCreateDialog);"/>
                    <p:commandButton value="#{myBundle.Cancel}" onclick="CompagniaCreateDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
